{% extends "base.html" %}

{% block content %}
<div class="row">
    <div class="col-lg-8 mx-auto">
        <div class="jumbotron bg-light p-5 rounded text-center">
            <h1 class="display-4">欢迎使用实习管理系统</h1>
            <p class="lead">大学生专业实习管理平台</p>
            <hr class="my-4">
            <p>为学生、教师和企业提供全面的实习管理解决方案</p>
            
            {% if not current_user.is_authenticated %}
            <div class="d-grid gap-2 d-md-flex justify-content-center">
                <a class="btn btn-primary btn-lg me-md-2" href="{{ url_for('login') }}">
                    <i class="bi bi-box-arrow-in-right me-2"></i>立即登录
                </a>
                <a class="btn btn-outline-secondary btn-lg" href="{{ url_for('register') }}">
                    <i class="bi bi-person-plus me-2"></i>注册账号
                </a>
            </div>
            {% else %}
            <div class="alert alert-info">
                <h5>欢迎回来！</h5>
                <p>您已登录为：<strong>{{ current_user.username }}</strong> ({{ current_user.role }})</p>
                <a href="{{ url_for('logout') }}" class="btn btn-outline-primary">退出登录</a>
            </div>
            {% endif %}
        </div>

        <div class="row mt-5">
            <div class="col-md-4 mb-3">
                <div class="card h-100 text-center">
                    <div class="card-body">
                        <i class="bi bi-person-check display-4 text-primary mb-3"></i>
                        <h5 class="card-title">学生功能</h5>
                        <p class="card-text">浏览实习岗位、提交申请、管理实习过程</p>
                    </div>
                </div>
            </div>
            <div class="col-md-4 mb-3">
                <div class="card h-100 text-center">
                    <div class="card-body">
                        <i class="bi bi-mortarboard display-4 text-success mb-3"></i>
                        <h5 class="card-title">教师功能</h5>
                        <p class="card-text">指导学生实习、审阅报告、评定成绩</p>
                    </div>
                </div>
            </div>
            <div class="col-md-4 mb-3">
                <div class="card h-100 text-center">
                    <div class="card-body">
                        <i class="bi bi-building display-4 text-warning mb-3"></i>
                        <h5 class="card-title">企业功能</h5>
                        <p class="card-text">发布实习岗位、筛选简历、管理实习生</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}